package singleton.demo1;

/**
 * 饱汉模式 线程不安全
 */
public class Test03 {
    private Test03(){}

    private static Test03 INS;

    public static Test03 getInstance(){
        if(null == INS){
            try {
                Thread.sleep(1);
            }catch (Exception e){
                e.printStackTrace();
            }
            INS = new Test03();
        }
        return  INS;
    }
}
